using MediatR;
using Process.DAL;
using Process.Model;

namespace Process.Api.Application.Command.BOM
{
    /// <summary>
    /// 获取BOM详情命令
    /// </summary>
    public class GetBomDetailCommand : IRequest<ApiResult<BomDetailDto>>
    {
        /// <summary>
        /// BOM ID
        /// </summary>
        public int Id { get; set; }
    }

    /// <summary>
    /// BOM详情DTO
    /// </summary>
    public class BomDetailDto
    {
        /// <summary>
        /// BOM基本信息
        /// </summary>
        public BomTable BomInfo { get; set; }

        /// <summary>
        /// BOM配件列表
        /// </summary>
        public List<BomGoodsDetailDto> GoodsList { get; set; } = new List<BomGoodsDetailDto>();

        /// <summary>
        /// BOM工艺流程列表
        /// </summary>
        public List<BomFlowDetailDto> FlowList { get; set; } = new List<BomFlowDetailDto>();
    }

    /// <summary>
    /// BOM配件详情DTO
    /// </summary>
    public class BomGoodsDetailDto
    {
        /// <summary>
        /// 物品编号
        /// </summary>
        public string GoodsCode { get; set; }
        /// <summary>
        /// 物品名称
        /// </summary>
        public string GoodsName { get; set; }
        /// <summary>
        /// 规格型号
        /// </summary>
        public string GoodsModel { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 物品类型
        /// </summary>
        public string GoodsType { get; set; }
        /// <summary>
        /// 最小库存
        /// </summary>
        public decimal MinStock { get; set; }
        /// <summary>
        /// 最大库存
        /// </summary>
        public decimal MaxStock { get; set; }
        /// <summary>
        /// 当前库存
        /// </summary>
        public decimal Stock { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        ///状态
        /// </summary>
        public bool Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
    }

    /// <summary>
    /// BOM工艺流程详情DTO
    /// </summary>
    public class BomFlowDetailDto
    {
        /// <summary>
        /// 工艺流程编号
        /// </summary>
        public string FlowCode { get; set; }

        /// <summary>
        /// 工艺流程名称
        /// </summary>
        public string FlowName { get; set; }

        /// <summary>
        /// 工艺流程数量
        /// </summary>
        public string FlowNumber { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public string Responsible { get; set; }

        /// <summary>
        /// 所属部门
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 状态（0：禁用；1：启用）
        /// </summary>
        public int Status { get; set; } = 0;

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
    }
}


